/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/9 14:21
 * @copyright: 博为峰
 */
public class ForDemo01 {
    public static void main(String[] args) {
        for (int i = 0; i < 3; i++) {
//            System.out.println("i = " + i);
        }

        //打印1-100之间偶数的个数
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 0) {
                count++;
            }
//            System.out.println("i = " + i);
        }
//        System.out.println("count = " + count);

        //1-10累加的和 1+2+3+4+5+6+7+8+9+10
        /*
             1+2=3
             3+3=6
             6+4=10
             10+5=15
             15+6=21
             21+7=28
             28+8=36
             36+9=45
             45+10=55
             ...
        */
        int sum = 0;
        for (int i = 1; i <= 10; i++) {
            sum = sum + i;
        }
        System.out.println("sum = " + sum);

    }
}
